var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
    })(e, t);
}, function(e, t) {
    function r() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (r.prototype = t.prototype, 
    new r());
}), a = this && this.__decorate || function(e, t, o, r) {
    var n, c = arguments.length, i = c < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, o) : r;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) i = Reflect.decorate(e, t, o, r); else for (var l = e.length - 1; 0 <= l; l--) (n = e[l]) && (i = (c < 3 ? n(i) : 3 < c ? n(t, o, i) : n(t, o)) || i);
    return 3 < c && i && Object.defineProperty(t, o, i), i;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("EggsManager"), s = e("LoadManager"), c = e("Global"), l = cc._decorator, d = l.ccclass, u = l.property, p = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.showSprite = null, e.hideSprite = null, e.toggle = null, e.gunIdx = null, 
        e;
    }
    return i(e, t), e.prototype.start = function() {}, e.prototype.init = function(e) {
        this.hideSprite.node.scale = this.showSprite.node.scale = 4 < e ? .3 : .55, this.gunIdx = e, 
        s.default.getInstance().loadSpriteFrame({
            url: "image/eggs/彩蛋墙" + c.G.eggGunModelList[this.gunIdx].m + "@2x",
            sprite: this.hideSprite
        }), s.default.getInstance().loadSpriteFrame({
            url: "image/eggs/彩蛋墙" + c.G.eggGunModelList[this.gunIdx].m + "@2x",
            sprite: this.showSprite
        }), GA.Info.underCheck ? (this.hideSprite.node.color = r.default.getInstance().checkEggGun(this.gunIdx) < 0 ? cc.Color.BLACK : cc.Color.WHITE, 
        this.showSprite.node.color = cc.Color.WHITE) : (this.hideSprite.node.color = r.default.getInstance().checkEggGun(this.gunIdx) < 0 ? cc.Color.BLACK : cc.Color.WHITE, 
        this.showSprite.node.color = r.default.getInstance().checkEggGun(this.gunIdx) < 0 ? cc.Color.BLACK : cc.Color.WHITE);
    }, a([ u(cc.Sprite) ], e.prototype, "showSprite", void 0), a([ u(cc.Sprite) ], e.prototype, "hideSprite", void 0), 
    a([ u(cc.Toggle) ], e.prototype, "toggle", void 0), a([ d ], e);
}(cc.Component);

n.default = p;